package com.zscat.mallplus.center.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zscat.mallplus.center.entity.CenterColumnsRecommend;
import com.zscat.mallplus.center.mapper.CenterColumnsRecommendMapper;
import com.zscat.mallplus.center.service.ICenterColumnsRecommendService;

/**
 * 栏目推荐Service业务层处理
 * 
 * @author Wsen
 * @date 2020-10-03
 */
@Service
public class CenterColumnsRecommendServiceImpl implements ICenterColumnsRecommendService 
{
    @Autowired
    private CenterColumnsRecommendMapper centerColumnsRecommendMapper;

    /**
     * 查询栏目推荐
     * 
     * @param id 栏目推荐ID
     * @return 栏目推荐
     */
    @Override
    public CenterColumnsRecommend selectCenterColumnsRecommendById(Long id)
    {
        return centerColumnsRecommendMapper.selectCenterColumnsRecommendById(id);
    }

    /**
     * 查询栏目推荐列表
     * 
     * @param centerColumnsRecommend 栏目推荐
     * @return 栏目推荐
     */
    @Override
    public List<CenterColumnsRecommend> selectCenterColumnsRecommendList(CenterColumnsRecommend centerColumnsRecommend)
    {
        return centerColumnsRecommendMapper.selectCenterColumnsRecommendList(centerColumnsRecommend);
    }

    /**
     * 新增栏目推荐
     * 
     * @param centerColumnsRecommend 栏目推荐
     * @return 结果
     */
    @Override
    public int insertCenterColumnsRecommend(CenterColumnsRecommend centerColumnsRecommend)
    {
        return centerColumnsRecommendMapper.insertCenterColumnsRecommend(centerColumnsRecommend);
    }

    /**
     * 修改栏目推荐
     * 
     * @param centerColumnsRecommend 栏目推荐
     * @return 结果
     */
    @Override
    public int updateCenterColumnsRecommend(CenterColumnsRecommend centerColumnsRecommend)
    {
        return centerColumnsRecommendMapper.updateCenterColumnsRecommend(centerColumnsRecommend);
    }

    /**
     * 批量删除栏目推荐
     * 
     * @param ids 需要删除的栏目推荐ID
     * @return 结果
     */
    @Override
    public int deleteCenterColumnsRecommendByIds(Long[] ids)
    {
        return centerColumnsRecommendMapper.deleteCenterColumnsRecommendByIds(ids);
    }

    /**
     * 删除栏目推荐信息
     * 
     * @param id 栏目推荐ID
     * @return 结果
     */
    @Override
    public int deleteCenterColumnsRecommendById(Long id)
    {
        return centerColumnsRecommendMapper.deleteCenterColumnsRecommendById(id);
    }
}
